<?php

namespace App\Models;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class Hotel extends Authenticatable
{
    use Notifiable;
    
    protected $table = 'hotels';

    protected $fillable = [
    	'name',
    	'username',
    	'password'
    ];

    protected $hiiden = [
    	'hotel_password'
    ];

    public function hotelInfo(){
    	return $this->hasOne('App\Models\HotelInfo','hotel_id','id');
    }

    public function tourismRecommend(){
    	return $this->hasOne('App\Models\TourismRecommend','hotel_id','id');
    }

    public function hotelGuide(){
    	return $this->hasOne('App\Models\HotelGuide','hotel_id','id');
    }

    public function cleans(){
    	return $this->hasMany('App\Models\Clean','hotel_id','id');
    }

    public function sundries(){
    	return $this->hasMany('App\Models\Sundrie','hotel_id','id');
    }

    public function welfares(){
    	return $this->hasMany('App\Models\Welfare','hotel_id','id');
    }

    public function complaints(){
    	return $this->hasMany('App\Models\Complaint','hotel_id','id');
    }

    public function storeLevels(){
    	return $this->hasMany('App\Models\StoreLevel','hotel_id','id');
    }

    public function StoreGoods(){
    	return $this->hasMany('App\Models\StoreGoods','hotel_id','id');
    }

    public function rooms(){
    	return $this->hasMany('App\Models\Room','hotel_id','id');
    }

    public function orders(){
    	return $this->hasMany('App\Models\Order','hotel_id','id');
    }
}
